package com.lakeworks.mapper;

import com.lakeworks.common.domain.ticket.TktTicket;

import java.util.List;
import java.util.Map;

/**
 * 工单Mapper接口
 *
 * @author lake
 * @date 2023-07-17
 */
public interface TktTicketMapper {
    /**
     * 查询工单
     *
     * @param id 工单主键
     * @return 工单
     */
    public TktTicket selectTktTicketById(Long id);

    /**
     * 查询工单列表
     *
     * @param tktTicket 工单
     * @return 工单集合
     */
    public List<TktTicket> selectTktTicketList(TktTicket tktTicket);

    /**
     * 新增工单
     *
     * @param tktTicket 工单
     * @return 结果
     */
    public int insertTktTicket(TktTicket tktTicket);

    /**
     * 修改工单
     *
     * @param tktTicket 工单
     * @return 结果
     */
    public int updateTktTicket(TktTicket tktTicket);

    /**
     * 删除工单
     *
     * @param id 工单主键
     * @return 结果
     */
    public int deleteTktTicketById(Long id);

    /**
     * 批量删除工单
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteTktTicketByIds(String[] ids);


    Map<String, Object> selectProductByBarcode(String barcode);

    TktTicket selectTktTicketBychannelId(Long channelId,Long channelTicketId);


    TktTicket selectTktTicketByRelevanceId(Long relevanceId);


    List<TktTicket> selectTicketNotFinished(String orderNo);


    List<TktTicket> selectTicketByOrderNoAndType(String orderNo);

    List<TktTicket> selectTicketByOrderNo(String orderNo);
}
